﻿@model UserViewModel
@{
	ViewBag.Title = SiteStrings.SiteSettings_UserManagement_AddAdmin_Title;
	ViewData["UsersActive"] = true;
}
<script type="text/javascript">
	$(document).ready(function ()
	{
		// Form validation
		var validationRules =
		{
			NewUsername: {
				required: true
			},
			Password: {
				required: true
			},
			PasswordConfirmation: {
				required: true
			}
		};
		var validation = new Roadkill.Web.Validation();
		validation.Configure("#addedit-user-form", validationRules);
	});
</script>

@Html.SiteSettingsNavigation()

<div class="col-lg-6">
	<h2>
		@SiteStrings.SiteSettings_UserManagement_AddAdmin_Title
	</h2>

	@Html.BootstrapValidationSummary(SiteStrings.SiteSettings_UserManagement_AddUser_Error)

	<form role="form" method="post" id="addedit-user-form">
		<div class="form-group">
			<label for="NewUsername">@SiteStrings.Shared_Username_Label</label>
			@Html.BootstrapTextBoxFor(s => s.NewUsername, SiteStrings.SiteSettings_UserManagement_AddUser_Help)
		</div>

		<div class="form-group">
			<label for="NewEmail">@SiteStrings.Shared_Email_Label</label>
			@Html.BootstrapTextBoxFor(s => s.NewEmail, SiteStrings.Shared_Email_Label)
		</div>

		<div class="form-group">
			<label for="Password">@SiteStrings.Shared_Password_Label</label>
			@Html.BootstrapPasswordFor(s => s.Password, SiteStrings.Shared_Password_Label)
		</div>

		<div class="form-group">
			<label for="PasswordConfirmation">@SiteStrings.Shared_PasswordConfirm_Label</label>
			@Html.BootstrapPasswordFor(s => s.PasswordConfirmation, SiteStrings.Shared_PasswordConfirm_Label)
		</div>

		<div class="form-group">
			<input type="submit" value="@SiteStrings.Button_Save" class="btn btn-primary right" />
		</div>
	</form>
</div>